import jsonschema

json_data = {
    "success":True,
    "code":10000,
    "message":"操作成功",
    "money":6.66,
    "address":None,
    "data":{"name":"tom",
            "age":18.5},
    "lucknumber":[6,8,9]
}

schema = {
    "type":"object",
    "properties":{
        "success":{"type":"boolean"},
        "code":{"type":"integer"},
        "message":{"const":"操作成功"},
        "money":{"type":"number"},
        "address":{"type":"null"},
        "data":{
            "type":"object",
            "properties":{
                "name": {"pattern":"m$"},
                "age":{"type":"number"}
            },
            "required":["name","age"]
        },
        "lucknumber":{"type":"array"}
    },
    "required":["success","data"]
}

res = jsonschema.validate(instance=json_data,schema=schema)

print("校验结果：",res)